package org.setec;

import java.util.HashMap;
import java.util.Map;

public class CacheableDataService {

    public Map DB = new HashMap();

    public String command(Command command) {
        String code = command.getCode();
        String context = command.getContext();
        String param = command.getParam();


        if( command.getCode().equals("select") ){
            return (String)DB.get(context);
        }

        if( command.getCode().equals("update") ){
            DB.put(context, param);
        }
        
        return null;
    }

}
